package com.ynny.two_dimensional_array01;

public class ArrayExample01 {

    static int[][] array = new int[3][4];//成员变量

    public static void main(String[] args) {

        array[0][0] = 3;
        array[0][1] = 5;
        array[0][2] = 8;

        array[1][0] = 12;
        array[1][1] = 9;


        array[2][0] = 7;

        array[2][2] = 6;
        array[2][3] = 6;

        int sum = 0;
        for (int i = 0; i < array.length; i++) {

            for (int j = 0; j < array[i].length; j++) {

                sum = sum + array[i][j];
            }
        }

        System.out.println(sum);

    }




}
